﻿<%-- The following 4 lines are ASP.NET directives needed when using SharePoint components --%>
<%@ Page Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" MasterPageFile="~masterurl/default.master" language="C#" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<asp:Content ID="ContentTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Home
</asp:Content>

<asp:Content ID="ContentPageTitle" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server">
Home
</asp:Content>

<%-- The markup and script in the following Content element will be placed in the <head> of the page --%>
<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
    <script type="text/javascript" src="../Scripts/jquery-1.6.2.min.js"></script>
    <!-- Add your CSS styles to the following file -->
    <link rel="Stylesheet" type="text/css" href="../Content/AppBack.css" />
</asp:Content>

<%-- The markup and script in the following Content element will be placed in the <body> of the page --%>
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">

    <p class="intro" id="intro">
        Welcome in the Galleriffic App for SharePoint. This page provides features to manage and preview a dynamic and cool pictures gallery in your web site.
    </p>

    <h2 id="carouseltext">Galleriffic for SharePoint App Management</h2>
    
    <script type="text/javascript">

        // Function to retrieve a query string value.
        // For production purposes you may want to use
        // a library to handle the query string.
        function getQueryStringParameter(paramToRetrieve) {
            var params =
                document.URL.split("?")[1].split("&");
            var strParams = "";
            for (var i = 0; i < params.length; i = i + 1) {
                var singleParam = params[i].split("=");
                if (singleParam[0] == paramToRetrieve)
                    return singleParam[1];
            }
        }

        function ShowPreview() {
            //Using a generic object.
            var options = {
                title: "Galleriffic App Part Preview",
                width: 880,
                height: 620,
                url: "GallerifficAppPart.aspx?SPHostUrl=" + decodeURIComponent(getQueryStringParameter("SPHostUrl"))
            };

            SP.UI.ModalDialog.showModalDialog(options);
        }
    </script>

    <div class="admin-links">
        <a href="../Lists/PicturesGallery/">
            <div class="admin-link manage-carousel-pics">
                <div class="box-content"><div class="box-content-text" id="manage-carousel-news">Manage Pics</div></div>
            </div>
        </a>
        <a href="#" onclick="javascript:ShowPreview(); return false;">
            <div class="admin-link sample">
                <div class="box-content"><div class="box-content-text" id="manage-carousel-preview">App Part Preview</div></div>
            </div>
        </a>
        <a href="Help.aspx"  id="carousel-help-link">
            <div class="admin-link help">
                <div class="box-content"><div class="box-content-text" id="manage-carousel-help">Help</div></div>
            </div>
        </a>
    </div>

    <p class="footer" id="footer">The Galleriffic for SharePoint App is an open source tool distributed under MIT license by <a href="http://blogs.msdn.com/b/ocarpen/" target="_blank">Olivier Carpentier</a>. More information about this tool is available on the <a href="https://gallerifficapp.codeplex.com/" target="_blank">Codeplex web site</a>. This tool is based on the excellent <a href="http://www.twospy.com/galleriffic/" target="_blank">Galleriffic</a> jquery extension by Trent Foley.</p>
    <p class="footer"><span id="app-current-version">App version:</span> 1.0.0.0</p>

</asp:Content>
